/**
 * 
 */
package org.clj.manager.impl;

import java.util.List;

import javax.annotation.Resource;

import org.clj.bean.User;
import org.clj.manager.UserManager;
import org.clj.maper.UserMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Administrator
 *
 */
@Service(value="userManager")
public class UserManagerImpl implements UserManager {

	@Resource
	private UserMapper userMapper;
	/* (non-Javadoc)
	 * @see org.hyn.manager.UserManager#findUser(java.lang.String)
	 */
	@Override
	public User findUser(String uname) {
		User user=userMapper.getUser(uname);
		return user;
	}
	@Override
	@Transactional(propagation=Propagation.REQUIRED,rollbackFor=Exception.class)
	public String addUser(User user) {
		userMapper.insertUser(user);
		return "";
	}
	@Override
	public List<User> queryUserList(User user) {
		
		return userMapper.queryUser(user);
	}
	
	
	
}
